﻿using System;

namespace Yyd.Security.Permissions
{
    public interface ICurrentPermission
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        Guid? UserId { get; }

        /// <summary>
        /// 当前操作的权限名
        /// </summary>
        string Name { get; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        IDisposable Change(string name = null);
    }
}
